package com.hdd.biz.operate.controller;


import com.hdd.biz.operate.dto.FeedbackInfoRequest;
import com.hdd.biz.operate.dto.FeedbackListRequest;
import com.hdd.biz.operate.dto.FeedbackRequest;
import com.hdd.biz.operate.service.FeedbackService;
import com.hdd.biz.painting.dto.FramingListRequest;
import com.hdd.dto.SuperResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * <p>
 * 反馈建议记录表 前端控制器
 * </p>
 *
 * @author fang
 * @since 2021-03-09
 */
@RestController
@RequestMapping("/operate/feedback")
@Api(value = "用户反馈",tags = {"用户反馈"})
@CrossOrigin(origins = "*",maxAge = 3600)
public class FeedbackController {

    @Autowired
    private FeedbackService feedbackService;


    @PostMapping("/list")
    @ApiOperation(value = "反馈列表" ,notes = "")
    public SuperResponse list(@Valid @RequestBody FeedbackListRequest request ){
        return feedbackService.list(request);
    }

    @PostMapping("/info")
    @ApiOperation(value = "反馈详情" ,notes = "")
    public SuperResponse info(@Valid @RequestBody FeedbackRequest request ){
        return feedbackService.info(request);
    }

    @PostMapping("/update")
    @ApiOperation(value = "反馈修改" ,notes = "")
    public SuperResponse update(@Valid @RequestBody FeedbackInfoRequest request ){
        return feedbackService.udpate(request);
    }

    @PostMapping("/delete")
    @ApiOperation(value = "反馈删除" ,notes = "")
    public SuperResponse delete(@Valid @RequestBody FeedbackRequest request ){
        return feedbackService.delete(request);
    }
}

